package com.smart.controller.sys;

import com.smart.dto.SysCarDto;
import com.smart.entity.SysCar;
import javax.annotation.Resource;
import com.smart.util.CommonPage;
import com.smart.util.CommonResult;
import com.smart.service.sys.SysCarService;
import io.swagger.annotations.ApiOperation;
import com.smart.controller.BaseController;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lgb
 * @date 2020年6月17日 上午8:15:31
 * Copyright (C) 深圳工勘科技
 * @说明: 车辆管理
 **/
@RestController("sysCarController")
@RequestMapping("/sys/car/")
public class SysCarController extends BaseController{

	@Resource
	private SysCarService sysCarService;
	
	@ApiOperation("page => 根据名获取角色列表")
    @GetMapping(value="page")
    public CommonResult<CommonPage<SysCar>> list(SysCarDto carDto,
          @RequestParam(value="pageSize") Integer pageSize,
          @RequestParam(value="pageNum") Integer pageNum) {
        IPage<SysCar> lists = sysCarService.findPage(carDto,pageSize,pageNum);
        return CommonResult.success(CommonPage.restPage(lists));
    }
	
	
}